{
  "properties" : { },
  "id" : "copy1741254813926d12203",
  "script" : null,
  "groupId" : "db1752dae044456b895d5a690a0f498d",
  "name" : "删除部署(所有)",
  "createTime" : null,
  "updateTime" : 1744482123469,
  "lock" : null,
  "createBy" : null,
  "updateBy" : "可辉",
  "path" : "delete_all",
  "method" : "DELETE",
  "parameters" : [ ],
  "options" : [ {
    "name" : "role",
    "value" : "root",
    "description" : "允许拥有该角色的访问",
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"msg\": \"success\",\n    \"data\": 1\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import 'org.activiti.engine.RepositoryService' as repositoryService;
import org.activiti.engine.repository.DeploymentQuery;

DeploymentQuery query = repositoryService.createDeploymentQuery();

var list = query.list();
var resList = [];
for (item in list) {
    repositoryService.deleteDeployment(item.id, false);
}

return 1;